home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 07 / PointCreateAlt.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  262 b   |  16 lines

  1. class Point { int x, y;
  2. Point(int x, int y) { 
  3. this.x = x;
  4. this.y = y;
  5. }
  6. Point() { 
  7. x = -1;
  8. y = -1;
  9. } }
  10.  
  11. class PointCreateAlt {
  12. public static void main(String args[]) { 
  13. Point p = new Point();
  14. System.out.println("x = " + p.x + " y = " + p.y);
  15. } }
  16.